import Vue from 'vue'
import Router from 'vue-router'
import routes from './routes'
import store from '@/Vuex/index'
Vue.use(Router)

let router = new Router({
  routes: routes
})

router.beforeEach((to, from, next) => {
  store.commit('TITLE_CONFIG', {title: to.meta.title, isAlways: to.meta.isAlways})
  next()
})

export default router
